<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
    <meta charset="utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    <title>运营账号管理</title>
    <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"/>
    <link rel="stylesheet" href="assets/materialize/css/materialize.min.css" media="screen,projection"/>
    <link href="assets/css/bootstrap.css" rel="stylesheet"/>
    <link href="assets/css/font-awesome.css" rel="stylesheet"/>
    <link rel="stylesheet" href="assets/css/layui.css" type="text/css"/>
    <link rel="stylesheet" href="assets/css/style.css"  rel="stylesheet"  type="text/css">
    <link href="assets/js/morris/morris-0.4.3.min.css" rel="stylesheet"/>
    <link href='http://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'/>
    <link rel="stylesheet" href="assets/js/Lightweight-Chart/cssCharts.css"/>
    <!-- Custom Styles-->
    <link href="assets/css/custom-styles.css" rel="stylesheet"/>
    <script src="assets/js/jquery-1.10.2.js"></script>
    <script src="assets/js/bootstrap.min.js"></script>
    <script src="assets/materialize/js/materialize.min.js"></script>
    <script src="assets/js/jquery.metisMenu.js"></script>
    <script src="assets/js/morris/raphael-2.1.0.min.js"></script>
    <script src="assets/js/morris/morris.js"></script>
    <script src="assets/js/easypiechart.js"></script>
    <script src="assets/js/easypiechart-data.js"></script>
    <script src="assets/js/Lightweight-Chart/jquery.chart.js"></script>
    <!-- Custom Js -->
    <script src="assets/js/custom-scripts.js"></script>
    <!--<script src="assets/js/Management_OA.js"></script>-->
    <script src="assets/js/myindex.js"></script>
</head>
<body>
<!-- 让整个页面变暗 -->
<div id="light-down">
    <!-- 会弹出的div -->

</div>
<div id="wrapper">
    <nav class="navbar navbar-default top-navbar" role="navigation">
        <div class="navbar-header">
            <div class="navbar-brand waves-effect waves-dark">
                <div id="navInfo" style="margin:-14px 0px 0px 20px;">意源接口测试</div>
                <div id="sideNav" href=""><i class="material-icons dp48">toc</i></div>
            </div>
        </div>
        <!--<div id="navInfo">意源接口测试</div>-->

    </nav>
    <ul id="dropdown1" class="dropdown-content">
        <li><a onclick="logout()"><i class="fa fa-sign-out fa-fw"></i> 退出</a></li>
    </ul>
    <nav class="navbar-default navbar-side" role="navigation">
        <div class="sidebar-collapse">
            <ul class="nav" id="main-menu">
                <li>
                    <a href="index.html" class="waves-effect waves-dark"><i class="fa fa-dashboard"></i>首页</a>
                </li>
                <li>
                    <a href="#" class="waves-effect waves-dark"><i class="fa fa-sitemap"></i>配置管理<span
                            class="fa arrow"></span></a>
                    <ul class="nav nav-second-level">
                        <li>
                            <a href="systemConfig/systemConfig.html"><i class="fa fa-user" aria-hidden="true"></i>接口地址配置</a>
                        </li>
                    </ul>
                </li>
                <li>
                    <a href="#" class="waves-effect waves-dark"><i class="fa fa-file"></i>接口测试管理<span
                            class="fa arrow"></span></a>
                    <ul class="nav nav-second-level">
                        <li>
                            <a href="SOF_test/SOFInterface.html"><i class="fa fa-bars" aria-hidden="true"></i>签名验签测试</a>
                        </li>
                        <li>
                            <a href="#"><i class="fa fa-bars" aria-hidden="true"></i>时间戳测试</a>
                        </li>
                        <li>
                            <a href="#"><i class="fa fa-bars" aria-hidden="true"></i>SDF测试</a>
                        </li>
                    </ul>
                </li>
            </ul>
        </div>
    </nav>
    <div id="page-wrapper">
        <div class="header">
            <h2 class="page-header">签名验签接口测试</h2>
            <ol class="breadcrumb">
                <li><a href="#">接口测试管理</a></li>
                <li><a href="#">签名验签接口测试</a></li>
            </ol>
        </div>
        <div id="page-inner"class="module-banner-tab-list-box bd" style="margin:0 auto;">
            <!--  下半部分  -->
            <div style="padding:20px;width:95%;margin:0 auto;">
                <div style="width:50%;float:left;">
                    <div class="layui-form-item">
                        <label class="layui-form-label">设置签名算法：</label>
                        <select class="form-control" style="width:300px;" onchange="setSignMethod()">
                            <option >请选择</option>
                            <option value="SGD_SM3_SM2">SM3SM2算法 </option>
                            <option value="SGD_SHA1_RSA">Sha1RSA算法</option>
                        </select>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">应用签名证书：</label>
                        <div class="layui-input-block">
                            <textarea style="height:90px;" id="getCert" style="width: 300px;"  class="layui-input"></textarea>
                            <button class="layui-btn" onclick="getCert()">获取签名证书</button>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">消息签名：</label>
                        <div class="layui-input-block">
                            <input type="text" id="indata" style="width: 300px;" class="layui-input">
                            <button class="layui-btn" onclick="signMessage()">数据签名</button>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">消息签名值：</label>
                        <div class="layui-input-block">
                            <textarea style="height:90px;"  id="signvalue"  name="keyValue" style="width: 300px;"  class="layui-input"></textarea>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">验证消息签名：</label>
                        <div class="layui-input-block">
                            <input type="text" id="verifyValue" style="width: 300px;" class="layui-input" readonly="readonly">
                            <button class="layui-btn" onclick="verifySignMessage()">验证签名</button>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">不带原文的消息签名：</label>
                        <div class="layui-input-block">
                            <input type="text" id="signMessageDetach" style="width: 300px;"   class="layui-input">
                            <button class="layui-btn" onclick="signMessageDetach()">不带原文的消息签名</button>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">消息签名值：</label>
                        <div class="layui-input-block">
                            <textarea style="height:90px;"  id="signDetachValue"  style="width: 300px;"  class="layui-input"></textarea>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">验证不带原文的消息签名：</label>
                        <div class="layui-input-block">
                            <input type="text" id="verifySignMessageDetach" style="width: 300px;"  class="layui-input" readonly="readonly">
                            <button class="layui-btn" onclick="verifySignMessageDetach()">验证不带原文的消息签名</button>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">随机数：</label>
                        <div class="layui-input-block">
                            <input type="text" id="getRandom" style="width: 300px; " class="layui-input">
                            <button class="layui-btn" onclick="getRandom()">获取随机数</button>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">数字签名：</label>
                        <div class="layui-input-block">
                            <input type="text" id="inSignData" style="width: 300px;" style="width: 300px;"  class="layui-input">
                            <button class="layui-btn" onclick="signData()">数据签名</button>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">数据签名值：</label>
                        <div class="layui-input-block">
                            <textarea style="height:90px;" id="signDataValue1"   style="width: 300px;"  class="layui-input"></textarea>
                        </div>
                    </div>


                </div>
                <div style="width:50%;float:left;">
                    <div class="layui-form-item">
                        <label class="layui-form-label">验证签名：</label>
                        <div class="layui-input-block">
                            <input type="text" id="valifySignData"style="width: 300px;"  class="layui-input" readonly="readonly">
                            <button class="layui-btn" onclick="valifySignData()">验证签名</button>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">文件签名：</label>
                        <div class="layui-input-block">
                            <input type="file" id="fileSign" style="width: 300px;background-color: #009688;display: unset; " class="btn btn-primary">
                            <button class="layui-btn" onclick="signFile()">文件签名</button>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">数据签名值：</label>
                        <div class="layui-input-block">
                            <textarea style="height:90px;" id="signFileVal"   style="width: 300px;"  class="layui-input"></textarea>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">验证文件签名：</label>
                        <div class="layui-input-block">
                            <input type="text"id="valifySignFile"style="width: 300px;"  class="layui-input" readonly="readonly">
                            <button class="layui-btn" onclick="valifySignFile()">验证文件签名</button>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">验证证书有效性：</label>
                        <div class="layui-input-block">
                            <input type="text" id="validateCert"style="width: 300px;"  class="layui-input" readonly="readonly">
                            <button class="layui-btn" onclick="validateCert()">验证证书有效性</button>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">设置加密算法：</label>
                        <select class="form-control" style="width:300px;" onchange="setEncryptMethod()">
                            <option >请选择</option>
                            <option value="SGD_SM3_SM2">SGD_SM4_ECB算法 </option>
                            <option value="SGD_SHA1_RSA">SGD_SM4_CBC算法</option>
                        </select>
                    </div>

                    <div class="layui-form-item">
                        <label class="layui-form-label">获取应用证书信息：</label>
                        <div class="layui-input-block">
                            <select class="form-control" style="width:300px;" onchange="getCertInfo()">
                                <option >请选择</option>
                                <option value="0x00000021">证书颁发者CN</option>
                                <option value="0x00000022">证书颁发者O</option>
                                <option value="0x00000023">证书颁发者OU</option>
                                <option value="0x00000031">证书拥有者信息CN</option>
                                <option value="0x00000032">证书拥有者信息O</option>
                                <option value="0x00000033">证书拥有者信息OU</option>
                                <option value="0x00000034">证书拥有者信息EMAIL</option>
                                <option value="0x00000035">证书起始日期</option>
                                <option value="0x00000036">证书截至日期</option>
                            </select>
                            <input type="text"  id="getCertInfoVal"style="width: 300px;"  class="layui-input">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">获取指定用途的应用证书：</label>
                        <textarea style="height:90px;" id="getServerCertificateByUsage" style="width: 300px;"  class="layui-input"></textarea>
                        <button class="layui-btn" onclick="getServerEncryptCertificateByUsage()">加密证书</button>
                        <button class="layui-btn" onclick="getServerSignCertificateByUsage()">签名证书</button>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">加密数据：</label>
                        <div class="layui-input-block">
                            <input type="text"id="encryptData"style="width: 300px;"  class="layui-input">
                            <button class="layui-btn" onclick="encryptData()">加密数据</button>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">数据加密值：</label>
                        <div class="layui-input-block">
                            <textarea style="height:90px;" id="encryptvalue"   style="width: 300px;"  class="layui-input"></textarea>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">解密数据：</label>
                        <div class="layui-input-block">
                            <input type="text"  id="decryptData"style="width: 300px;"  class="layui-input" readonly="readonly">
                            <button class="layui-btn"  onclick="decryptData()">解密数据</button>
                        </div>
                    </div>
                </div>
            </div>

            </div>
            <footer><p>Copyright &copy; 2021.All rights reserved.</p></footer>
        </div>
    </div>
</div>
</body>
</html>